package com.logica.tutorial.model;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

@Entity
@Table(name="Address")
public class Address implements Serializable {
	
	private static final long serialVersionUID = -1775596341985368544L;
	@Id
	@PrimaryKeyJoinColumn
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Basic(optional = false)
	private Long addressId;	
	private String street;	
	private String houseNr;
	private String city;
	private Integer zipCode;
		
	public Address() {}
	
	public Address(String street, String houseNr, String city, int zipCode) {
		this.street = street;
		this.houseNr = houseNr;
		this.city = city;
		this.zipCode = zipCode;
	}
	
	public Long getId() {
		return addressId;
	}
	
	public void setId(Long addressId) {
		this.addressId = addressId;
	}

	public String getStreet() {
		return street;
	}

	public String getHouseNr() {
		return houseNr;
	}

	public String getCity() {
		return city;
	}

	public Integer getZipCode() {
		return zipCode;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public void setHouseNr(String houseNr) {
		this.houseNr = houseNr;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public void setZipCode(Integer zipCode) {
		this.zipCode = zipCode;
	}
}